package com.lx.pc.mybatis.repository.information;

import java.math.BigInteger;
import java.util.List;

import org.springframework.data.mybatis.repository.annotation.Query;
import org.springframework.data.mybatis.repository.support.MybatisRepository;
import org.springframework.stereotype.Repository;

import com.lx.pc.domain.entity.information.InformationEntity;

@Repository("informationRepository")
public interface InformationRepository extends MybatisRepository<InformationEntity, BigInteger>{

	/**
	 * 查询总数
	 */
	@Query("findByInformationCount")
	public int findByInformationCount(InformationEntity information);
	
	/**
	 * 查询分页
	 * @param InformationEntity
	 * @param page
	 * @param size
	 * @return
	 */
	@Query("findByInformation")
	public List<InformationEntity> findByInformation(InformationEntity information,Integer page,Integer size);
	
	/**
	 * 详情查看
	 * @param id
	 * @return
	 */
	@Query("findByInformationId")
	public InformationEntity findByInformationId(BigInteger id);
}
